package com.iot.web.controller.system;

import java.util.List;
import javax.servlet.http.HttpServletResponse;

import com.github.pagehelper.PageInfo;
import com.iot.common.constant.HttpStatus;
import com.iot.common.utils.DateUtils;
import com.iot.system.core.CoreLineHourEnergyInfoService;
import com.iot.system.domain.DeviceData;
import com.iot.system.domain.DeviceYields;
import com.iot.system.domain.vo.DeviceYieldsVo;
import com.iot.system.vo.DeviceTotalParamVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.iot.common.annotation.Log;
import com.iot.common.core.controller.BaseController;
import com.iot.common.core.domain.AjaxResult;
import com.iot.common.enums.BusinessType;
import com.iot.system.domain.LineHourEnergyInfo;
import com.iot.system.service.ILineHourEnergyInfoService;
import com.iot.common.utils.poi.ExcelUtil;
import com.iot.common.core.page.TableDataInfo;

/**
 * 产线小时能耗Controller
 * 
 * @author iot
 * @date 2025-02-12
 */
@RestController
@RequestMapping("/system/info")
public class LineHourEnergyInfoController extends BaseController
{
    @Autowired
    private CoreLineHourEnergyInfoService coreLineHourEnergyInfoService;


    @PostMapping("/list")
    public AjaxResult list(@RequestBody LineHourEnergyInfo lineHourEnergyInfo)
    {
        //startPage();
        coreLineHourEnergyInfoService.dealWithLineEnergy(1L,lineHourEnergyInfo.getLineDate());
        return success(0);
    }


    @PostMapping("/yields")
    public AjaxResult yields(@RequestBody DeviceTotalParamVo deviceTotalParamVo)
    {
        //startPage();
        coreLineHourEnergyInfoService.countLineHourYieldsInfo(1L,deviceTotalParamVo.getLineDate());
        return success(0);
    }
}
